<?php

/**
 * Filter to test that a variable is not empty
 *
 * @category   McCube
 * @package    Template\Parser\Filter
 * @author     Leiha Sellier <leiha.sellier@gmail.com>
 * @license    http://creativecommons.org/licenses/by/3.0/  CC BY 3.0
 * @link       http://code.google.com/p/mechanics-cubes/
 */
class McCube_Template_Parser_Filter_NotEmpty
    extends McCube_Template_Parser_Filter_Abstract{

    /**
     * Build the filter around the value (text or variable)
     *
     * @param string $string Value for filter application
     * @param array  $params Settings for filter
     * @return string
     */
    public static function build($string, $params=array()){
        return '!empty('.$string.')';
    }
}